package com.lkm.market2_0.m_imple.app_main;

import com.lkm.frame.task2.ITaskExecutor;
import com.lkm.frame.task2.TaskManager;
import com.lkm.market2_0.entity.ResponEntity;
import com.lkm.market2_0.netapi.Api;
import com.lkm.market2_0.task.AsyncTask2;



 class CheckOkPasswordForSTask extends AsyncTask2<String,String,ResponEntity<Boolean>> {

    private String steelyardMac;
    public CheckOkPasswordForSTask(ITaskExecutor<String, String, ResponEntity<Boolean>> taskExecutor, TaskManager mTaskManager,String steelyardMac) {
        super(taskExecutor, CheckOkPasswordForSTask.class.getName(), mTaskManager);
        this.steelyardMac=steelyardMac;
    }

    @Override
    protected void doAsyncExecuting(String code){
        ResponEntity<Void> re=ResponEntity.fromJson(
                Api.checkOkPassword(steelyardMac,code,CheckOkPasswordForSTask.this)
                ,null,""
        );
        ResponEntity<Boolean> res=new ResponEntity<>(re);
        res.setData(re.isSuccess());
        complete(res);
    }

}
